package tech.aistar.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 一个简单的hello world的例子
 */
//@RestController = @Controller + @ResponseBody(将数据以json格式的方式返回)
@RestController
public class HelloBoot {

    @GetMapping("/hello")
    public String hello(Integer id,String name){
        //Integer id = Integer.valueOf(request.getParameter("id"));
        //String name = request.getParameter("name");
        System.out.println("id:"+id);
        System.out.println("name:"+name);
        return "success";
    }
}
